package com.ysstech.valuation.controller;


import com.ysstech.common.annotation.YssLog;
import com.ysstech.common.controller.BaseController;
import com.ysstech.valuation.entity.FuturesDealDetailed;
import com.ysstech.valuation.entity.SecuritiesDealDetailed;
import com.ysstech.valuation.service.FuturesDealDetailedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import java.util.List;
import java.util.Map;

/**
 * <p>
 * 期货交易明细表 前端控制器
 * </p>
 *
 * @author lishuangliang
 * @since 2021-07-05
 */
@Controller
@Slf4j
@Api(tags = "期货交易流水管理api")
@RequestMapping("/futuresDealDetailed")
public class FuturesDealDetailedController extends BaseController {

    @Autowired
    private FuturesDealDetailedService futuresDealDetailedService;

    /**
     * 获取期货交易的明细数据，返回对象封装成股票的 没笔交易的成交金额
     *
     * @param futuresDealDetailed
     * @return
     * @throws Exception
     */
    @ApiOperation(value = "获取期货交易流水信息")
    @YssLog(module = "期货交易流水管理", remark = "获取期货交易流水信息")
    @PostMapping(value = "/queryFuturesDealDetailed")
    @ResponseBody
    public Map<String, List<SecuritiesDealDetailed>> queryFuturesDealDetailed(@RequestBody FuturesDealDetailed futuresDealDetailed) throws Exception {
        return futuresDealDetailedService.queryFuturesDealDetailed(futuresDealDetailed);
    }
}
